package br.ufrn.btest.decorators.expressions;

import java.util.Set;

import de.be4.classicalb.core.parser.node.AUnaryExpression;
import de.be4.classicalb.core.parser.node.PExpression;

public class MyAUnaryExpression extends MyExpressionDecorator {

	
	private AUnaryExpression unary;
	
	
	public MyAUnaryExpression(AUnaryExpression unary) {
		this.unary = unary;
	}
	
	
	
	@Override
	public PExpression getNode() {
		return this.unary;
	}
	
	
	
	@Override
	public Set<String> getVariables() {
		return super.getVariables();
	}
	
	
	
	@Override
	public String toString() {
		MyExpression expression = MyExpressionFactory.convertExpression(this.unary.getExpression());
		return "-" + expression.toString();
	}
	
	
	
	@Override
	public boolean isInterval() {
		return false;
	}
	
	
	
	@Override
	public boolean isBasicType() {
		return false;
	}
}
